package com.yxw.yx_hotel.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;


/** 
 * @author liuxin
 * @create 2024-01-18 11:11:19 
 * @description 宿舍资产配置 
 */
@Data
@TableName(value ="yx_room_property")
@ApiModel(value = "宿舍资产配置" , description="yx_room_property")
public class YxRoomPropertyEntity  implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value="property_id",type = IdType.ASSIGN_ID)
    @ApiModelProperty(value="资产配置ID")
    private Long propertyId;

    @TableField(value="room_id")
    @ApiModelProperty(value="宿舍ID")
    private Long roomId;

    @TableField(value="room_name")
    @ApiModelProperty(value="宿舍名称")
    private String roomName;

    @TableField(value="property_type")
    @ApiModelProperty(value="资产类型 1：自购 2：非自购")
    private Integer propertyType;

    @TableField(value="property_code")
    @ApiModelProperty(value="资产编号")
    private String propertyCode;

    @TableField(value="property_name")
    @ApiModelProperty(value="资产名称")
    private String propertyName;

    @TableField(value="brand")
    @ApiModelProperty(value="品牌")
    private String brand;

    @TableField(value="amount")
    @ApiModelProperty(value="金额")
    private Double amount;

    @TableField(value="buy_time")
    @ApiModelProperty(value="购入日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date buyTime;

    @TableField(value="warranty_date")
    @ApiModelProperty(value="保修到期日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date warrantyDate;

    @TableField(value="create_time")
    @ApiModelProperty(value="创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(value="create_id")
    @ApiModelProperty(value="创建人ID")
    private Long createId;

    @TableField(value="create_name")
    @ApiModelProperty(value="创建人名称")
    private String createName;

    @TableField(value="tenant_id")
    @ApiModelProperty(value="租户ID")
    private Long tenantId;


    @TableField(exist = false)
    @ApiModelProperty(value="报修次数")
    private int repairCnt;

    @TableField(exist = false)
    @ApiModelProperty(value="最近一次维修日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastRepairTime;

}
